import java.io.*;

public class GameSetup {
	public static void main(String args[])
	{
		String s = new File("").getAbsolutePath();
		String root = s.substring(0, s.length()-12);
		String aidir = root + "Cluedo\\Cluedo\\AI\\CustomAI\\";
		String compilerdir = root+"";
		String toWrite1 = "javac -classpath "+compilerdir+"Cluedo "+compilerdir+"Cluedo\\Cluedo\\AI\\CustomAI1.java";
		String toWrite2 = "javac -classpath "+compilerdir+"Cluedo "+compilerdir+"Cluedo\\Cluedo\\AI\\CustomAI2.java";
		String toWrite3 = "javac -classpath "+compilerdir+"Cluedo "+compilerdir+"Cluedo\\Cluedo\\AI\\CustomAI3.java";
		/*
		System.out.println(root);
		System.out.println(aidir);
	    System.out.println(toWrite);
	    */
	    
		try
	    {
	    	BufferedWriter out = new BufferedWriter(new FileWriter(".\\bin\\compileai1.cmd", false));
	    	out.write(toWrite1);
	        out.newLine();
	        out.close();
	    }
	     catch (Exception e){
	        System.out.println("Exception " + e);
	    }
	    System.out.println("compileai1.cmd:");
	    System.out.println("> "+toWrite1);
        try
	    {
	    	BufferedWriter out = new BufferedWriter(new FileWriter(".\\bin\\compileai2.cmd", false));
	    	out.write(toWrite2);
	        out.newLine();
	        out.close();
	    }
	     catch (Exception e){
	        System.out.println("Exception " + e);
	    }
	    System.out.println("compileai2.cmd:");
		System.out.println("> "+toWrite2);
        try
	    {
	    	BufferedWriter out = new BufferedWriter(new FileWriter(".\\bin\\compileai3.cmd", false));
	    	out.write(toWrite3);
	        out.newLine();
	        out.close();
	    }
	     catch (Exception e){
	        System.out.println("Exception " + e);
	    }
        System.out.println("compileai3.cmd:");
        System.out.println("> "+toWrite3);
        
        System.out.println("\n\n Success!");

	}
}
